﻿<UserControl x:Class="EpiDashboard.StatCalc.PopulationSurvey"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="350" Width="525" Background="#CCFFFFFF">
    <Grid>
        <GroupBox Margin="0,0,5,0">
            <GroupBox.Header>
                <TextBlock FontWeight="Bold">StatCalc - Sample Size and Power</TextBlock>
            </GroupBox.Header>
            <StackPanel x:Name="pnlMainContent" Background="White">
                <StackPanel.ContextMenu>
                    <ContextMenu>
                        <MenuItem x:Name="mnuSave" Header="Save As Image..."/>
                        <MenuItem x:Name="mnuPrint" Header="Print..."/>
                    </ContextMenu>
                </StackPanel.ContextMenu>
                <TextBlock TextWrapping="Wrap" Padding="15" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" TextAlignment="Center">Population survey or descriptive study<LineBreak></LineBreak>For simple random sampling, leave design effect and clusters equal to 1.</TextBlock>
                <Grid Height="250">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".5*" />
                        <ColumnDefinition Width=".5*" />
                    </Grid.ColumnDefinitions>
                    <Grid Grid.Column="0" HorizontalAlignment="Center">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="110"/>
                            <ColumnDefinition Width="130"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="50"/>
                            <RowDefinition Height="50"/>
                            <RowDefinition Height="50"/>
                            <RowDefinition Height="50"/>
                            <RowDefinition Height="50"/>
                        </Grid.RowDefinitions>
                        <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" TextWrapping="Wrap">Population size:</TextBlock>
                        <TextBox Grid.Row="0" Grid.Column="1" TextAlignment="Right" Height="30" Width="120" HorizontalAlignment="Right" FontFamily="Microsoft Sans Serif"  FontSize="20" x:Name="txtPopulationSize"></TextBox>
                        <TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" TextWrapping="Wrap">Expected frequency:</TextBlock>
                        <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="50" FontFamily="Microsoft Sans Serif" FontSize="20" x:Name="txtExpectedFreq"></TextBox>
                            <TextBlock VerticalAlignment="Center" FontWeight="Black">&#160;%</TextBlock>
                        </StackPanel>
                        <TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" TextWrapping="Wrap">Confidence limits:</TextBlock>
                        <StackPanel Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="50" FontFamily="Microsoft Sans Serif" FontSize="20" x:Name="txtConfidenceLimits"></TextBox>
                            <TextBlock VerticalAlignment="Center" FontWeight="Black">&#160;%</TextBlock>
                        </StackPanel>
                        <TextBlock VerticalAlignment="Center" Grid.Row="3" Grid.Column="0" TextWrapping="Wrap">Design effect:</TextBlock>
                        <StackPanel Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="50" FontFamily="Microsoft Sans Serif" FontSize="20" x:Name="txtDesignEffect" Grid.Column="1" Margin="66,9,14,11" Grid.Row="3"></TextBox>
                        </StackPanel>
                        <TextBlock VerticalAlignment="Center" Grid.Row="4" Grid.Column="0" TextWrapping="Wrap">Clusters:</TextBlock>
                        <StackPanel Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="50" FontFamily="Microsoft Sans Serif" FontSize="20" x:Name="txtNumberOfClusters" Grid.Column="1" Margin="66,9,14,11" Grid.Row="3"></TextBox>
                        </StackPanel>
                    </Grid>
                    <Grid Grid.Column="1" HorizontalAlignment="Center">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="73" />
                            <ColumnDefinition Width="73" />
                            <ColumnDefinition Width="73" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Rectangle Grid.Column="0" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" Foreground="White" TextAlignment="Center" Margin="5,-1,5,0">Confidence<LineBreak></LineBreak>Level</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="1" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1">80%</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="2" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2">90%</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="3" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3">95%</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="4" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4">97%</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="5" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="5">99%</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="6" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="6">99.9%</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="7" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="7">99.99%</TextBlock>

                        <Rectangle Grid.Column="1" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0" FontWeight="Bold" Foreground="White" TextAlignment="Center">Cluster<LineBreak></LineBreak>Size</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="1" Stroke="Black"/>
                        <TextBlock Name="txt80" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" FontWeight="Bold">164</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="2" Stroke="Black"/>
                        <TextBlock Name="txt90" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2" FontWeight="Bold">270</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="3" Stroke="Black"/>
                        <TextBlock Name="txt95" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3" FontWeight="Bold">384</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="4" Stroke="Black"/>
                        <TextBlock Name="txt97" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="4" FontWeight="Bold">471</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="5" Stroke="Black"/>
                        <TextBlock Name="txt99" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="5" FontWeight="Bold">663</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="6" Stroke="Black"/>
                        <TextBlock Name="txt999" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="6" FontWeight="Bold">1082</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="7" Stroke="Black"/>
                        <TextBlock Name="txt9999" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="7" FontWeight="Bold">1512</TextBlock>

                        <Rectangle Grid.Column="2" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="0" FontWeight="Bold" Foreground="White" TextAlignment="Center">Total<LineBreak></LineBreak>Sample</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="1" Stroke="Black"/>
                        <TextBlock Name="ttxt80" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1" FontWeight="Bold">164</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="2" Stroke="Black"/>
                        <TextBlock Name="ttxt90" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="2" FontWeight="Bold">270</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="3" Stroke="Black"/>
                        <TextBlock Name="ttxt95" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="3" FontWeight="Bold">384</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="4" Stroke="Black"/>
                        <TextBlock Name="ttxt97" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="4" FontWeight="Bold">471</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="5" Stroke="Black"/>
                        <TextBlock Name="ttxt99" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="5" FontWeight="Bold">663</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="6" Stroke="Black"/>
                        <TextBlock Name="ttxt999" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="6" FontWeight="Bold">1082</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="7" Stroke="Black"/>
                        <TextBlock Name="ttxt9999" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="7" FontWeight="Bold">1512</TextBlock>
                    </Grid>
                </Grid>
            </StackPanel>
        </GroupBox>
        <Image x:Name="imgClose" Source="..\Images\x.png" HorizontalAlignment="Right" VerticalAlignment="Top" Stretch="None" />
    </Grid>
</UserControl>
